package com.nwcl.ysx.request;

import com.nwcl.common.request.BaseRequest;
import com.nwcl.common.result.Result;
import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author liguiqin
 * @date 2023/5/30
 */
public class CouponsReceiveRequest implements BaseRequest {
    private List<Integer> couponsIds=new ArrayList<>();//优惠券id

    @Override
    public Result check() {
        if (CollectionUtils.isEmpty(couponsIds)) {
            return Result.fail("优惠券id不能为空");
        }
        return null;
    }

    public List<Integer> getCouponsIds() {
        return couponsIds;
    }

    public void setCouponsIds(List<Integer> couponsIds) {
        this.couponsIds = couponsIds;
    }
}
